package com.ysyx.ysyx_passengerconfirmo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 乘客信息表
 * @TableName passenger_inf
 */
@TableName(value ="passenger_inf")
@Data
public class PassengerPojo implements Serializable {
    /**
     * 乘客id
     */
    @TableId(type = IdType.AUTO)
    private Integer passengerId;

    /**
     * 乘客账号
     */
    private String passengerAcc;

    /**
     * 乘客密码
     */
    private String passengerPwd;

    /**
     * 乘客姓名
     */
    private String passengerName;

    /**
     * 乘客身份证
     */
    private String passengerIdno;

    /**
     * 乘客手机号
     */
    private String passengerTel;

    /**
     * 状态 1启用 0禁用
     */
    private Integer passengerState;

    /**
     * 注册时间
     */
    private Date passengerCtime;

    /**
     * 第三方状态码
     */
    private String passengerOpenid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PassengerPojo other = (PassengerPojo) that;
        return (this.getPassengerId() == null ? other.getPassengerId() == null : this.getPassengerId().equals(other.getPassengerId()))
            && (this.getPassengerAcc() == null ? other.getPassengerAcc() == null : this.getPassengerAcc().equals(other.getPassengerAcc()))
            && (this.getPassengerPwd() == null ? other.getPassengerPwd() == null : this.getPassengerPwd().equals(other.getPassengerPwd()))
            && (this.getPassengerName() == null ? other.getPassengerName() == null : this.getPassengerName().equals(other.getPassengerName()))
            && (this.getPassengerIdno() == null ? other.getPassengerIdno() == null : this.getPassengerIdno().equals(other.getPassengerIdno()))
            && (this.getPassengerTel() == null ? other.getPassengerTel() == null : this.getPassengerTel().equals(other.getPassengerTel()))
            && (this.getPassengerState() == null ? other.getPassengerState() == null : this.getPassengerState().equals(other.getPassengerState()))
            && (this.getPassengerCtime() == null ? other.getPassengerCtime() == null : this.getPassengerCtime().equals(other.getPassengerCtime()))
            && (this.getPassengerOpenid() == null ? other.getPassengerOpenid() == null : this.getPassengerOpenid().equals(other.getPassengerOpenid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPassengerId() == null) ? 0 : getPassengerId().hashCode());
        result = prime * result + ((getPassengerAcc() == null) ? 0 : getPassengerAcc().hashCode());
        result = prime * result + ((getPassengerPwd() == null) ? 0 : getPassengerPwd().hashCode());
        result = prime * result + ((getPassengerName() == null) ? 0 : getPassengerName().hashCode());
        result = prime * result + ((getPassengerIdno() == null) ? 0 : getPassengerIdno().hashCode());
        result = prime * result + ((getPassengerTel() == null) ? 0 : getPassengerTel().hashCode());
        result = prime * result + ((getPassengerState() == null) ? 0 : getPassengerState().hashCode());
        result = prime * result + ((getPassengerCtime() == null) ? 0 : getPassengerCtime().hashCode());
        result = prime * result + ((getPassengerOpenid() == null) ? 0 : getPassengerOpenid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", passengerId=").append(passengerId);
        sb.append(", passengerAcc=").append(passengerAcc);
        sb.append(", passengerPwd=").append(passengerPwd);
        sb.append(", passengerName=").append(passengerName);
        sb.append(", passengerIdno=").append(passengerIdno);
        sb.append(", passengerTel=").append(passengerTel);
        sb.append(", passengerState=").append(passengerState);
        sb.append(", passengerCtime=").append(passengerCtime);
        sb.append(", passengerOpenid=").append(passengerOpenid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}